<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>
<head>

  <meta http-equiv="Content-Language" content="en-us">


  <title>IupDropButton</title>
  <link rel="stylesheet" type="text/css" href="../../style.css">

  <style type="text/css">
.style1 {
	margin-left: 40px;
}
  .auto-style1 {
	  font-size: large;
  }
  .auto-style2 {
	margin-left: 2em;
}
  </style>
</head>


<body>

<div id="navigation">
  
<ul>

    <li><a href="#Creation">Creation</a></li>

    <li><a href="#Attributes">Attributes</a></li>

    <li><a href="#Callbacks">Callbacks</a></li>

    <li><a href="#Notes">Notes</a></li>

    <li><a href="#Examples">Examples</a></li>

    <li><a href="#SeeAlso">See Also</a></li>

  
</ul>

</div>


<h2>IupDropButton <span class="auto-style1">(since 3.25)</span></h2>


  
<p>
Creates an interface element that is a button with a drop down arrow. It can 
function as a button and as a dropdown. Its visual presentation can contain a text and/or an image.</p>
<p>When dropped displays a child inside a dialog with no decorations, so it can 
simulate the initial function of a dropdown list, but it can display any layout 
of IUP elements inside the dropped dialog. When the user click outside the 
dialog, it is automatically closed.</p>
<p>It inherits from
  <a href="../elem/iupcanvas.html">IupCanvas</a>.</p>


<h3><a name="Creation">Creation</a></h3>


<pre>Ihandle* IupDropButton(Ihandle*<strong> dropchild</strong>); [in C]<br>iup.dropbutton{[<strong>dropchild</strong>: ihandle]} -&gt; <strong>ih</strong>: ihandle [in Lua]<br>dropbutton(<strong>dropchild</strong>) [in LED]</pre>

  
  <p><strong>child</strong>: Identifier of an interface element to be displayed 
  when the dropdown is activated. It can be NULL (nil in Lua), or empty in LED. 
  It is not a regular child of the dropbutton. It will be displayed inside a 
  dialog with no decorations.</p>

  
<p>
  <u>Returns:</u> the identifier of the 
  created element, or NULL if an error occurs.</p>


<h3><a name="Attributes">Attributes</a></h3>



<p>Inherits all attributes and callbacks of the <a href="../elem/iupcanvas.html">IupCanvas</a>, 
but redefines a few attributes.</p>
<p><b>ALIGNMENT</b> (<font size="3">non inheritable</font>): horizontal and 
vertical alignment of the set image+text. Possible values: &quot;ALEFT&quot;, &quot;ACENTER&quot; and &quot;ARIGHT&quot;,&nbsp; 
combined to &quot;ATOP&quot;, &quot;ACENTER&quot; and &quot;ABOTTOM&quot;. Default: &quot;ALEFT:ACENTER&quot;. Partial 
values are also accepted, like &quot;ARIGHT&quot; or &quot;:ATOP&quot;, the other value will be 
obtained from the default value. Alignment does not includes the padding area. </p>
<p><strong>ARROWACTIVE</strong> (<font SIZE="3">non inheritable</font>): the 
arrow can be disabled when the button is enabled. If there is no drop child the 
arrow will be automatically disabled.</p>
<p><strong>ARROWALIGN</strong> (<font SIZE="3">non inheritable</font>): vertical 
arrow alignment. Can be: TOP, CENTER or BOTTOM. Default: CENTER. (since 3.27)</p>


<p><strong>ARROWCOLOR</strong>: color used for the arrow. Default use FGCOLOR.</p>


<p><strong>ARROWIMAGES</strong> (<font SIZE="3">non inheritable</font>): replace 
the drawn arrows by the following images. Make sure their sizes are equal or 
smaller than ARROWSIZE. Default: No.</p>
<p><strong>ARROWIMAGE </strong>(<font SIZE="3">non inheritable</font>):
  Arrow image name. Use
	<a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also
	<a href="../elem/iupimage.html">IupImage</a>. </p>
<p class="auto-style2"><strong>ARROWIMAGEHIGHLIGHT</strong> (<font SIZE="3">non inheritable</font>): 
Arrow image name of the element in highlight state. If it is not defined then the 
ARROWIMAGE is used.</p>
  <p class="auto-style2"><strong>ARROWIMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  Arrow image name of the element when inactive. If it is not defined then the 
  ARROWIMAGE  
  is used and its colors will be replaced by a modified version creating the 
  disabled effect. </p>

  
<p class="auto-style2"><strong>ARROWIMAGEPRESS </strong>(<font size="3">non inheritable</font>): Arrow image 
name of the element in pressed state. If it is not defined then the ARROWIMAGE is 
used.</p>
<p><strong>ARROWPADDING</strong> (<font SIZE="3">non inheritable</font>): 
internal margin for the arrow. It is inside ARROWSIZE. Default: 5.</p>
<p><strong>ARROWSIZE</strong> (<font SIZE="3">non inheritable</font>): size of 
the area occupied by the arrow, even when using images. Default: 24</p>


  <p><strong>BACKIMAGE</strong> (<font SIZE="3">non inheritable</font>):
  image name to be used as background. Use
	<a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also
	<a href="../elem/iupimage.html">IupImage</a>. </p>
<p class="auto-style2"><strong>BACKIMAGEHIGHLIGHT</strong> (<font SIZE="3">non inheritable</font>): 
background image name of the element in highlight state. If it is not defined 
then the BACKIMAGE is used.</p>
  <p class="auto-style2"><strong>BACKIMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  background image name of the element when inactive. If it is not defined then 
  the BACKIMAGE is used and its colors will be replaced by a modified version 
  creating the disabled effect.</p>

  
<p class="auto-style2"><strong>BACKIMAGEPRESS </strong>(<font size="3">non inheritable</font>): 
background image name of the element in pressed state. If it is not defined then 
the BACKIMAGE is used.</p>

<p><strong>BACKIMAGEZOOM</strong> (<font size="3">non inheritable</font>): 
if set the back image will be zoomed to occupy the full background. Aspect ratio 
is NOT preserved. Can be 
Yes or No. Default: No. (since 3.25)</p>

<p><a href="../attrib/iup_bgcolor.html">BGCOLOR</a>: Background color. If text 
and image are not defined, the button is configured to simply show a color, in 
this case set the button size because the natural size will be very small. If 
not defined it will use the background color of the native parent. </p>

<p class="auto-style2"><strong>HLCOLOR</strong>: background color used to indicate a highlight state. 
Pre-defined to &quot;200 225 245&quot;. Can be set to NULL. If NULL BGCOLOR will 
be used instead.</p>
<p class="auto-style2"><strong>PSCOLOR</strong>: background color used to indicate a press state. 
Pre-defined to &quot;150 200 235&quot;. Can be set to NULL. If NULL BGCOLOR will 
be used instead.</p>


<p><b>BORDER </b>(creation only):
  
  the default value is "NO". This is the <strong>IupCanvas</strong> border.</p>
<p><strong>BORDERCOLOR</strong>: color used for borders. Default: &quot;50 150 255&quot;. 
This is for the <strong>IupDropButton</strong> drawn border.</p>
<p class="auto-style2"><strong>BORDERPSCOLOR</strong>: color used for borders when pressed or 
selected. Default use BORDERCOLOR.</p>
<p class="auto-style2"><strong>BORDERHLCOLOR</strong>: color used for borders when highlighted. 
Default use BORDERCOLOR.</p>
<p><strong>BORDERWIDTH</strong>: line width used for borders. Default: &quot;1&quot;. Any borders can be 
hidden by simply setting 
this value to 0. This is for the <strong>IupDropButton</strong> drawn border.</p>
<p><strong>SHOWBORDER</strong>: by default borders are drawn only when the 
button is highlighted, if SHOWBORDER=Yes borders are always show. When 
SHOWBORDER=Yes and BGCOLOR is not defined, the actual BGCOLOR will be a darker 
version of the background color of the native parent.</p>

<p><strong>CANFOCUS</strong> (creation only)<strong> </strong>(<font size="3">non inheritable</font>): 
enables the focus traversal of the control. In Windows the button will respect 
CANFOCUS in opposite to the other controls. Default: YES.</p>
<p><strong>FOCUSFEEDBACK</strong> (<font size="3">non inheritable</font>): draw 
the focus feedback. Can be Yes or No. Default: Yes. (since 3.26)</p>

<p><strong>DROPCHILD</strong>: the name of the element that will be displayed 
when dropped. Use <a href="../func/iupsethandle.html">IupSetHandle</a> 
or <a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
associate a child to a name. In Lua you can also use the element reference 
directly. The drop dialog, were the drop child is inserted, is available right 
after setting the attribute using <strong>IupGetDialog</strong> on the drop 
child handle. See the <a href="#Notes">Notes</a> bellow for more information.</p>
<p><strong>DROPCHILD_HANDLE</strong>: same as DROPCHILD but directly using the Ihandle* of the element.</p>
<p><strong>DROPONARROW</strong> (<font SIZE="3">non inheritable</font>): 
when enabled only clicking on the drop arrow will show the drop child. Clicking 
on the remaining of the button will call FLAT_ACTION. There will be two 
separates areas in the button, one for the drop arrow and one for the regular 
button. When disabled there will be only one area, and the drop child will be 
show any where the button is clicked, the callback FLAT_ACTION will not be 
called. Default: Yes.</p>
<p><strong>DROPPOSITION</strong> (<font SIZE="3">non inheritable</font>): 
the drop child can be shown in four different positions relative to the drop 
button: BOTTOMLEFT, TOPLEFT, BOTTOMRIGHT, TOPRIGHT. BOTTOMLEFT the top-left 
corner of the drop child is aligned with the bottom-left corner of the drop 
button, BOTTOMRIGHT the top-right corner of the drop child is aligned with the 
bottom-right corner of the drop button, TOPLEFT the bottom-left corner of the 
drop child is aligned with the top-left corner of the drop button, TOPRIGHT the 
bottom-right corner of the drop child is aligned with the top-right corner of 
the drop button. Default: BOTTOMLEFT. </p>

<p><strong>PROPAGATEFOCUS </strong>(<font size="3">non inheritable</font>): 
enables the focus callback forwarding to the next native parent with FOCUS_CB 
defined. Default: NO.</p>

<p>
<a href="../attrib/iup_expand.html" style="font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.7999992370605px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">
EXPAND</a><span style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.7999992370605px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(255, 255, 255);"><span class="Apple-converted-space">&nbsp;</span>(</span><font size="3" style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.7999992370605px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);">non 
inheritable</font><span style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.7999992370605px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(255, 255, 255);">): 
The default value is &quot;NO&quot;.<span class="Apple-converted-space">&nbsp;</span></span></p>

  
<p><a href="../attrib/iup_fgcolor.html">FGCOLOR</a>: Text color. Default: the 
global attribute DLGFGCOLOR.</p>



  
<p class="auto-style2"><strong>TEXTHLCOLOR</strong>: text color used to indicate a highlight state. 
If not defined FGCOLOR will 
be used instead. (since 3.26)</p>
<p class="auto-style2"><strong>TEXTPSCOLOR</strong>: text color used to indicate a press state. 
If not defined FGCOLOR will 
be used instead. (since 3.26)</p>



  
<p><strong>FITTOBACKIMAGE</strong> (<font size="3">non inheritable</font>): 
enable the natural size to be computed from the BACKIMAGE. If BACKIMAGE is not 
defined will be ignored. Can be 
Yes or No. Default: No.</p>


  <p><strong>FRONTIMAGE</strong> (<font SIZE="3">non inheritable</font>):
  image name to be used as foreground. The foreground image is drawn in the same 
  position as the 
  background, but it is drawn at last. Use
	<a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also
	<a href="../elem/iupimage.html">IupImage</a>.</p>
<p class="auto-style2"><strong>FRONTIMAGEHIGHLIGHT</strong> (<font SIZE="3">non inheritable</font>): 
foreground image name of the element in highlight state. If it is not defined 
then the FRONTIMAGE is used.</p>
  <p class="auto-style2"><strong>FRONTIMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  foreground image name of the element when inactive. If it is not defined then 
  the FRONTIMAGE is used and its colors will be replaced by a modified version 
  creating the disabled effect.</p>

  
<p class="auto-style2"><strong>FRONTIMAGEPRESS </strong> (<font size="3">non inheritable</font>): 
foreground image name of the element in pressed state. If it is not defined then 
the FRONTIMAGE is used.</p>
<p><strong>HASFOCUS </strong> (read-only): returns the button state if has 
focus. Can be Yes or No.</p>
<p><strong>HIGHLIGHTED </strong> (read-only): returns the button state if 
highlighted. Can be Yes or No.</p>
<p><strong>IMAGE</strong> (<font SIZE="3">non inheritable</font>):
  Image name. Use
	<a href="../func/iupsethandle.html">IupSetHandle</a> or
	<a href="../func/iupsetattributehandle.html">IupSetAttributeHandle</a> to 
	associate an image to a name. See also
	<a href="../elem/iupimage.html">IupImage</a>.</p>
<p class="auto-style2"><strong>IMAGEHIGHLIGHT</strong> (<font SIZE="3">non inheritable</font>): 
Image name of the element in highlight state. If it is not defined then the 
IMAGE is used.</p>
  <p class="auto-style2"><strong>IMAGEINACTIVE</strong> (<font SIZE="3">non inheritable</font>): 
  Image name of the element when inactive. If it is not defined then the IMAGE 
  is used and its colors will be replaced by a modified version creating the 
  disabled effect. </p>

  
<p class="auto-style2"><strong>IMAGEPRESS </strong>(<font size="3">non inheritable</font>): Image 
name of the element in pressed state. If it is not defined then the IMAGE is 
used.</p>

<p><strong>IMAGEPOSITION </strong>(<font size="3">non inheritable</font>): 
Position of the image relative to the text when both are displayed. Can be: 
LEFT, RIGHT, TOP, BOTTOM. Default: LEFT.</p>

  
<p><b>PADDING</b>: internal margin. Works just like the MARGIN attribute of 
  the <strong>IupHbox</strong> and <strong>IupVbox</strong> containers, but uses 
a different name to avoid inheritance problems. Alignment does not includes the 
padding area. Default value: &quot;3x3&quot;. Value can be DEFAULTBUTTONPADDING, 
so the global attribute of this name will be used instead (since 3.29).</p>
<p><strong>CPADDING</strong>: same as PADDING but using the units of the <strong>
	SIZE</strong> attribute. It will actually set the PADDING attribute. (since 
3.29)</p>

<p><strong>PRESSED </strong> (read-only): returns the button state if pressed. 
Can be Yes or No.</p>


<p><b>
  SHOWDROPDOWN</b> (write-only): opens or closes the dropdown child. Can be
  "YES" or
  "NO". Ignored if set before map. </p>

  
<p><strong>SPACING </strong>(<font SIZE="3">non inheritable</font>): spacing between the 
image and the text. Default: &quot;2&quot;.</p>

  
  <p><strong>CSPACING</strong>: same as SPACING but using the units of the 
  vertical part of the <strong>
	SIZE</strong> attribute. It will actually set the SPACING attribute. (since 
  3.29)</p>

  
  <p><a href="../attrib/iup_title.html">TITLE</a> (<font SIZE="3">non inheritable</font>): 
	Label's text. The '\n' character is accepted for line change.</p>
<p><strong>TEXTALIGNMENT </strong>(<font size="3">non inheritable</font>): 
Horizontal text alignment for multiple lines. Can be: ALEFT, ARIGHT or ACENTER. 
Default: ALEFT.</p>
<p><strong>TEXTWRAP </strong>(<font size="3">non inheritable</font>): For single 
line texts if the text is larger than its box the line will be automatically 
broken in multiple lines. Notice that this is done internally by the system, the 
element natural size will still use only a single line. For the remaining lines 
to be visible the element should use EXPAND=VERTICAL or set a SIZE/RASTERSIZE 
with enough height for the wrapped lines. (since 3.25)</p>
<p><strong>TEXTELLIPSIS </strong>(<font size="3">non inheritable</font>): 
If the text is larger that its box, an ellipsis (&quot;...&quot;) will be placed near the 
last visible part of the text and replace the invisible part. It will be ignored 
when TEXTWRAP=Yes. (since 3.25)</p>
<p>
<span style="color: rgb(0, 0, 0); font-family: tahoma, verdana, arial, helvetica, geneva, sans-serif; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 20.8px; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none; background-color: rgb(255, 255, 255);">
<span class="Apple-converted-space">
<strong>TEXTORIENTATION</strong> (<font size="3">non inheritable</font>): text 
angle in degrees and counterclockwise. The text size will adapt to include the 
rotated space. (since 3.25)</span></span></p>



  
<p><strong>VISIBLECOLUMNS</strong>: Defines the number of visible columns for 
the <strong>Natural</strong> <strong>Size</strong>, this means that will act 
also as minimum number of visible columns. It uses a wider character size then 
the one used for the SIZE attribute so strings will fit better without the need 
of extra columns. Padding will be around the visible columns.</p>



  
<blockquote>
    
  <hr>
</blockquote>

<p>
<a href="../attrib/iup_active.html">ACTIVE</a>,
<a href="../attrib/iup_font.html">FONT</a>, 
    <a href="../attrib/iup_expand.html">EXPAND</a>, <a href="../attrib/iup_screenposition.html">SCREENPOSITION</a>, 
<a href="../attrib/iup_position.html">
POSITION</a>, <a href="../attrib/iup_minsize.html">
MINSIZE</a>, <a href="../attrib/iup_maxsize.html">
MAXSIZE</a>,
    <a href="../attrib/iup_wid.html">WID</a>, <a href="../attrib/iup_tip.html">TIP</a>, <a href="../attrib/iup_size.html">SIZE</a>, 
<a href="../attrib/iup_rastersize.html">RASTERSIZE</a>,
    <a href="../attrib/iup_zorder.html">ZORDER</a>, <a href="../attrib/iup_visible.html">VISIBLE</a>,
<a href="../attrib/iup_theme.html">THEME</a>: 
also accepted.</p>


<h3><a name="Callbacks">Callbacks</a></h3>


<p>Inherits all callbacks of the <a href="../elem/iupcanvas.html">IupCanvas</a>, 
but redefines a few of them. Including ACTION, BUTTON_CB, MOTION_CB, FOCUS_CB, 
LEAVEWINDOW_CB, and ENTERWINDOW_CB. To allow the application to use those 
callbacks the same callbacks are exported with the &quot;FLAT_&quot; prefix using the same 
parameters, except the FLAT_ACTION callback that now mimics the <strong>
IupButton</strong> 
ACTION. They are all called before the internal callbacks and if they return 
IUP_IGNORE the internal callbacks are not processed.</p>
<p><strong>FLAT_ACTION</strong>:
  Action generated when the button 1 (usually 
  left) is selected. This callback is called only after the mouse is released and when it is released inside the 
  button area. Called only when DROPONARROW=Yes.</p>

  
    
<pre>int function(Ihandle*<strong> ih</strong>); [in C]<br><strong>ih</strong>:action() -&gt; (<strong>ret</strong>: number) [in Lua]</pre>

    
<p class="info"><strong>ih</strong>:
  identifier of the element that activated the 
  event.</p>

<p class="info"><u>Returns</u>: IUP_CLOSE will be processed.</p>

  
    
<p><b>DROPDOWN_CB</b>: Action generated right before the drop child is shown or hidden. 
This callback is also called when SHOWDROPDOWN is set.</p>

  
    
<pre>int function (Ihandle *<strong>ih</strong>, int <strong>state</strong>); [in C]<br><strong>ih</strong>:dropdown_cb(<strong>state</strong>: boolean) -&gt; (ret: number) [in Lua]</pre>

<p class="info"><strong>ih</strong>:
  identifier of the element that activated the 
  event.<br>

	<strong>state</strong>: the new state of the drop child 1=to be shown, 0=to 
be hidden.</p>

  
    
<p><b>DROPSHOW_CB</b>: Action generated right after the drop child is shown or hidden. 
This callback is also called when SHOWDROPDOWN is set.</p>

  
    
<pre>int function (Ihandle *<strong>ih</strong>, int <strong>state</strong>); [in C]<br><strong>ih</strong>:dropdown_cb(<strong>state</strong>: boolean) -&gt; (ret: number) [in Lua]</pre>

<p class="info"><strong>ih</strong>:
  identifier of the element that activated the 
  event.<br>

	<strong>state</strong>: the current state of the drop child 1=shown, 0=hidden.</p>

  
    
<hr class="style1">

<p> 
<a href="../call/iup_map_cb.html">MAP_CB</a>, 
<a href="../call/iup_unmap_cb.html">UNMAP_CB</a>, 
<a href="../call/iup_destroy_cb.html">DESTROY_CB</a>, 
<a href="../call/iup_getfocus_cb.html">GETFOCUS_CB</a>,
  <a href="../call/iup_killfocus_cb.html">KILLFOCUS_CB</a>, 
<a href="../call/iup_enterwindow_cb.html">ENTERWINDOW_CB</a>,
  <a href="../call/iup_leavewindow_cb.html">LEAVEWINDOW_CB</a>, 
<a href="../call/iup_k_any.html">K_ANY</a>,
  <a href="../call/iup_help_cb.html">HELP_CB</a>: All common callbacks are 
supported.</p>


<h3><a name="Notes">Notes</a></h3>


<p>The natural size will be a combination of the size of the image and the 
title, if any, plus PADDING and SPACING (if both image and title are present), 
and plus the horizontal space occupied by the arrow.</p>
<p>The drop dialog is configured with no decorations and it is not resizable, 
only the FOCUS_CB and K_ESC callbacks are set. But this can be changed by the 
application. It is a regular <a href="../dlg/iupdialog.html">IupDialog</a>. To 
obtain the drop button handle from the handle of the dialog get the &quot;DROPBUTTON&quot; 
attribute handle from the dialog, using
<a href="../func/iupgetattributehandle.html">IupGetAttributeHandle</a>. After 
performing some operation on the drop child, use SHOWDROPDOWN=NO on the drop 
button, you may also update its TITLE, just like a regular <strong>IupList</strong> with 
DROPDOWN=Yes, but this will not be performed automatically by the drop button. 
For example, set the ACTION callback on the IupList used as drop child:</p>
<pre>static int list_cb(Ihandle* list, char *text, int item, int state)
{
  if (state == 1)
  {
    Ihandle* ih = IupGetAttributeHandle(IupGetDialog(list), "DROPBUTTON");
    IupSetAttribute(ih, "SHOWDROPDOWN", "No");
    IupSetStrAttribute(ih, "TITLE", text);
  }
  return IUP_DEFAULT;
}</pre>
<p>Additionally to mimic a <strong>IupList</strong> with DROPDOWN=Yes set 
SHOWBORDER=Yes and DROPONARROW=NO on the drop button. But notice that the 
natural size will not use the largest item in the drop child list, so you can 
use EXPAND=HORIZONTAL or set VISIBLECOLUMNS, both on the drop button.</p>
<h3><a name="Examples">Examples</a></h3>

<p><a href="../../examples/">Browse for Example Files</a></p>

<p>The following screenshots where taken while the button is highlighted or 
dropped.</p>

<table align="center">

	<tbody>

	<tr>

		<td class="bg_winxp"><img src="images/iupdropbutton1a.png"></td>

		<td class="bg_winxp"><img src="images/iupdropbutton2a.png"></td>

		<td class="bg_winxp">&nbsp;</td>

	</tr>

	<tr>

		<td class="bg_winxp"><img src="images/iupdropbutton1.png"></td>

		<td class="bg_winxp"><img src="images/iupdropbutton2.png"></td>

		<td class="bg_winxp"><img src="images/iupdropbutton3.png"></td>

	</tr>

  </tbody>
</table>


<h3><a name="SeeAlso">See Also</a></h3>


<p><a href="iupimage.html">IupImage</a>, <a href="iupbutton.html">IupButton</a>, <a href="iuptoggle.html">IupToggle</a>,
<a href="iuplabel.html">IupLabel</a>, <a href="iuplist.html">IupList</a></p>



</body>
</html>
